<?php
	class template_data extends base
	{
		private static $self;
		private $data;

		/**
		 * 构造函数
		 * Enter description here ...
		 */
		private function __construct()
		{
			$this->data = new stdClass();
		}

		/**
		 * 单例入口
		 * Enter description here ...
		 */
		public static function get_self()
		{
			if (self::$self)
			{
				return self::$self;
			}

			self::$self = new self();

			return self::$self;
		}

		public function __get($key)
		{
			if (isset($this->data->$key))
			{
				return $this->data->$key;
			}

			return '';
		}

		public function __set($key, $value)
		{
			$this->data->$key = $value;
		}
	}